(navigation image)
Home American Libraries | Canadian Libraries | Universal Library | Community Texts | Project Gutenberg | Children's Library | Biodiversity Heritage Library | Additional Collections
Search: Advanced Search
Anonymous User (login or join us)
Upload
See other formats

Full text of "Programming"

Trippy RGB Color-Mixing Nightlight 



I 



Make Projects 



build, hack, tweak, share, discover, J 



Trippy RGB Color-Mixing 



Nightlight 

Written By: paul reisinger 



f TOOLS: ! PARTS: 



AXE026 

PICAXE 

Serial 

Download 

Cabled) 

or AXE027 

- PICAXE 

USB 

Download 

Cable 

AXE029 
Breadboard 
Adapter (1) 

Hot glue 
gun(1) 

PICAXE 
Program 
Editor (1) 



5MM Red LED (1) 

Mouser 696-SSL-LX5093XRC/4 http://www.mouser.com 

5MM Green LED (1) 

Mouser 696-SSL-LX5093UEGC 

5MM Blue LED (1) 

Mouser 696-SSL-LX5093USBC 

Solid-core hook up wire (20 inches) 
Mouser. Radio Shack or other 

20 ohm 1/4 W resistor (2) 
Mouser 66-RC07GF200J 

100 ohm 1/4 W resistor (1) 
Mouser 588-OD101JE 

100K ohm 1/4 W resistor (3) 
Mouser 291 -100K-RC 

Pert board (1) 
Radio Shack 276- 148 

StripboardM) 



© Make Projects 



www.makeprojects.com 



Page 1 of 6 



Trippy RGB Color-Mixing Nightlight 



Soldering 
iron (1) 

Solderless 
breadboard 

m 

Mouser, 
Radio 
Shack or 
other 

Tin snips 

m 



Mouser 854-ST3U 

PICAXE 08M IC (3) 
http.V/www.phanderson. com/picaxe/ 

8-Pin DIP IC socket (3) 
Radio Shack 276- 1995 or other 

Charger USB/AC for MP3 Players (1) 

ht tp://www. amazon. com/gp/product/B000A2BLEC/ref=ox_yaos product 

Jell-0 snack cups (2) 
Supermarket 

Saran Wrap(1) 
Supermarket 

Sheet metal strip (1) 

Home Depot or hardware store 

Double-sided foam tape (1 ft.) 
Hardware store or Radio Shack 

Scrap piece of cardboard (1) 
Supermarket 



SUMMARY 

For this variation on the original Trippy Nightlight an inexpensive (> $2.50) USB AC charger 
provides a traditional nightlight plug-in-the-wall form factor. To simplify the main circuit board 
I removed the download circuitry from the board and instead programmed the PICAXE 08M 
microcontrollers on a separate breadboard. Instead of a quartz crystal, two Jell-0 snack- 
size containers and a little bit of Saran Wrap diffuse the light. 

Total materials cost is about $15.00. The unit has been running problem-free for over six 
months. Electricity usage is almost too low to measure. Watch the YouTube video below to 
see the nightlight cycle through its color changes. 



© Make Projects 



www.makeprojects.com 



Page 2 of 6 



Trippy RGB Color-Mixing Nightlight 




Trim sides of Stripboard to get a 
tight fit. 



Verify with Mufti-meter you have 
a good connection 

Secure with Hot Glue 










• Cut a piece of stripboard a little more than 4 traces wide and about 3/4 inches long. 

• Sand or file down edges so it fits tightly in USB charger socket with the 4 Traces centered 
within the socket so you're making a good connection with left side +5 VDC pin & right side 
ground pin. Verify that you're getting a good connection with a multi-meter. Secure 
stripboard with hot glue. 

• If you don't have another 5 VDC power supply to use for programming the PICAXE ICs in 
the next step then you can now solder Red (+5VDC) and Black (ground) wires to 
stripboard. Make wires a little long so you can use it to power the PICAXE chip on the 
breadboard during programming. 

• Otherwise you can wait until after you have built the main circuit board to solder the power 
supply wires. 

• Tape over USB Charger's "Power On" red LED to block its light. 



© Make Projects 



www.makeprojects.com 



Page 3 of 6 



Trippy RGB Color-Mixing Nightlight 




Connecting AXEG29 Breadboard adapter to PIC AXE 08M for Programming 




Connecting AXE029 Breadboard adapter to PICAXE 08M for Programming 




• Build up solderless breadboard with PICAXE 08M IC and AXE029 breadboard adapter as 
shown in photographs. 

• For additional info go here , and/or see the PICAXE Manual 1 available from the 
Programming Editor Help menu. 

• Download Programming Editor from PICAXE website and install on your computer. 
Connect your PC using either Serial or USB cable, and download programs to PICAXE 
ICs. You can download the code here . 

• For additional help with programming, see the Editor's Help menu. Manual 1 is the most 
helpful for getting started the first time. 

• You need to program three PICAXE chips, one for each color LED - red, green, and blue. 
Program code is the same for each LED except for one line of code as shown below. Red 
LED: Colorinc =17 Green LED: Colorinc =23 Blue LED: Colorinc =37 This provides an 
offset so as to get a pleasing mix of color variations. 



© Make Projects 



www.makeprojects.com 



Page 4 of 6 



Trippy RGB Color-Mixing Nightlight 




Mem c*eu* Bet** 



■FlVrt 



(.J^lVC 




f 


JHVJ 


ul 






Using Radio Shack pert board 276-148, build the circuit as shown. You'll need to cut down 
the corners a little bit. 

Cut a cardboard disk the same diameter as Jell-0 snack cup bottom flange and attach to 
circuit board using double-stick foam tape and hot glue. 

Bend a small piece of sheet metal into a "IT and with double-stick foam tape and hot glue 
attach it to top of USB charger as shown. 

Solder power leads from the main circuit board to USB charger. Test to be sure all three 
LEDs illuminate. With double-stick foam tape and hot glue attach cardboard and circuit 
board to U-shaped bracket on top of USB charger. Bend the USB charger prongs outward 
a little to ensure it does not fall out off the wall socket. 



© Make Projects 



www.makeprojects.com 



Page 5 of 6 



Trippy RGB Color-Mixing Nightlight 





Td rirffusE light •■'.■jf 
LE[>5w*.EwanVJr-v 





ffOUtftl up Jall-0 OfM. 

«* 5*n4 Paper 





Fiv.il /■■.-.! ■:!!: y 



^r 





• Bend LEDs together so they will fit inside Jell-0 cup. To diffuse the light, wrap LEDs with 
Saran Wrap - experiment to get pleasing visual effect. 

• Rough up outside of the Jell-0 cups using sandpaper. 

• Put first Jell-0 cup over LEDs and Saran wrap, wrap thin layer of Saran Wrap outside the 
first Jell-0 cup, then install second Jell-0 cup on top of the first cup. Again, experiment to 
get the most pleasing visual effect. Finally, attach Jell-0 cups to cardboard base using hot 
glue. That's it; you're done! 

This document was last generated on 201 2-1 1 -02 1 1 :54:35 PM. 



© Make Projects 



www.makeprojects.com 



Page 6 of 6